<template>
  <div class="list">
    <!--      左边图片-->

    <div class="list_left ">
      <nuxt-link :to="'/details/'+list.id">
        <a href=""><img :src="list.img" alt=""></a>
      </nuxt-link>
    </div>
    <div class="list_right ">

      <nuxt-link :to="'/details/'+list.id">
      <h3>{{list.title}}</h3>
      </nuxt-link>
<!--      <p>{{list.content_html}}</p>-->
      <div class="list_right_center">
        <div style="display: flex;align-items: center">
<div>
  更新时间:{{list.add_time|dateFormat}}
</div>
          <div v-for="item in list.Tag">
            <el-tag >{{item.Title}}</el-tag>
          </div>

        </div>
        <div>
          <nuxt-link :to="'/details/'+list.id">
            <a href="">查看详情</a>
          </nuxt-link>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    props: {
      list: Object
    },
    data() {
      return {}
    },
    mounted() {
    },
    // 过滤器
    filters: {
      dateFormat(msg) {
        if (msg == 0) {
          return "2020/12/30"
        } else {

          return new Date(parseInt(msg) * 1000).toLocaleString().replace(/:\d{1,2}$/, ' ').split(" ")[0];

        }
      }
    },
  }
</script>

<style lang="less" scoped>
  .list {
    padding: 20px;
    margin: 20px 0;
    display: flex;
    background-color: #fff;

    .list_left {
      width: 260px;
      margin-right: 15px;

      img {
        width: 100%;
      }
    }

    .list_right {
      flex: 1;

      h2 > a {
        font-size: 18px;
        color: #333333;
      }

      p {
        font-size: 14px;
        color: #666666;
      }

      .list_right_center {
        margin: 10px 0;
        display: flex;
        justify-content: space-between;
      }
    }
  }

  // 最大 768px
  @media (max-width: 768px) {
    .list {
      display: block;
    }
    .nuxt_flet {
      margin-right: 0;
    }
  }

  // 最小 768px  到  最大 922px
  @media (min-width: 768px) and (max-width: 992px) {
    .nuxt_flet {
      margin-right: 0;
    }
  }

  // 最小 992px   到 最大 1200px
  @media (min-width: 992px) and (max-width: 1200px) {
  }

  // 最小1200px
  @media (min-width: 1200px) {
  }
</style>
